<template>
    <!-- AGV控制页面 -->
    <div class="page-agv">
        <!-- AGV切换 -->

        <div class="left-box">

            <div class="box1">
                <!-- AGV属性 -->
                <div class="title">主导轨移动

                    <!--          <el-button class="btn move" @click="benchmove([17])" icon="el-icon-video-play">-->
                    <!--            移动-->
                    <!--          </el-button>-->
                    <!--                    <el-button class="my_class" type="danger" @click="benchzero([17])">-->
                    <!--                        初始化-->
                    <!--                    </el-button>-->
                    <el-button class="my_class" type="danger" @click="is_DeviceReset = true">
                        急停复位
                    </el-button>
                    <el-button class="my_class" type="danger" @click="cmslocation()">
                        保存导轨位置
                    </el-button>
                    <el-button class="my_class" type="danger" @click="is_autolightcalculate = true">
                        计算灯光角度
                    </el-button>
                    <el-button class="my_class" type="danger" @click="twopoint">
                        双点光源6米
                    </el-button>
                    <el-button class="my_class" type="danger" @click="bigcard">
                        大图卡10米
                    </el-button>
                </div>
                <div class="attr" style="display: flex; align-items: center;">
                    <span class="span_move">前后移动：</span>
                    <!--                        <el-input placeholder="输入移动到的点位" v-model="bench[17]['position']"-->
                    <!--                                  onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '610'; if(parseInt(this.value) > 10375) this.value = '10375';"></el-input>-->
                    <el-input placeholder="输入移动到的点位" v-model="bench[17]['position']"
                        @keyup.native="validateInput17"></el-input>
                    <div>(0-8500mm)</div>
                    <!-- <el-descriptions-item>{{ 1 }}</el-descriptions-item> -->
                    <span class="span_location">当前位置：</span>
                    <el-input v-model="this.bench[17]['s']"></el-input>

                    <span class="span_v">速度：</span>
                    <el-input v-model="bench[17]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 150) this.value = '150';"></el-input>
                    <div>(0-150)</div>
                    <el-button class="el-button1st" type="text" icon="el-icon-s-tools" @click="benchmove(17)">移动
                    </el-button>
                    <el-button class="el-button1st" type="text" icon="el-icon-video-pause" @click="benchstop(17)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                    <!--          <el-button class="btn default" @click="benchstop([17])" icon="el-icon-video-pause">-->
                    <!--            停止-->
                    <!--          </el-button>-->


                </div>
            </div>
            <div class="box1">
                <!-- AGV手动导航 -->

                <div class="title">显示屏移动
                    <!--          <el-button class="btn move" @click="benchmove([4, 5, 6, 7])" icon="el-icon-video-play">-->
                    <!--            移动-->
                    <!--          </el-button>-->

                </div>
                <div class="attr">
                    <!-- <div class="name">点位移动：</div> -->
                    <div class="attr_box">
                        <span class="span_move">上下平移:</span>
                        <el-input placeholder="输入移动到的点位" v-model="bench[4]['position']" @keyup.native="validateInput4">
                        </el-input>
                        <div>(-150-150mm)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[4]['s']"></el-input>

                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[4]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                        <div>(0-5)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(4)">移动</el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(4)"
                            style="display: flex;  align-items: center;">停止
                        </el-button>
                    </div>
                    <div class="attr_box">
                        <span class="span_move">左右旋转:</span>
                        <el-input placeholder="输入Y轴旋转角度" v-model="bench[5]['position']" @keyup.native="validateInput55">
                        </el-input>
                        <div>(-180-180°)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[5]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[5]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                        <div>(0-5)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(5)">移动</el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(5)"
                            style="display: flex;  align-items: center;">停止
                        </el-button>
                    </div>
                    <div class="attr_box">
                        <span class="span_move">上下旋转:</span>
                        <el-input v-model="bench[6]['position']" placeholder="输入R轴旋转角度" @keyup.native="validateInput55">
                        </el-input>
                        <div>(-180-180°)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[6]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[6]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                        <div>(0-5)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(6)">移动</el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(6)"
                            style="display: flex;  align-items: center;">停止
                        </el-button>
                    </div>
                    <div class="attr_box">
                        <span class="span_move"> &nbsp;自&nbsp;&nbsp;&nbsp;&nbsp;旋&nbsp;&nbsp;:</span>
                        <el-input v-model="bench[7]['position']" placeholder="输入P轴旋转角度" @keyup.native="validateInput7">
                        </el-input>
                        <div>(-180-180°)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[7]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[7]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                        <div>(0-5)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(7)">移动</el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(7)"
                            style="display: flex;  align-items: center;">停止
                        </el-button>
                    </div>

                </div>
            </div>

            <div class="box1">
                <div class="title">显示屏补光光源
                </div>
                <div class="attr">

                    <div class="attr_box">
                        <span class="span_move">散射上弧形：</span>
                        <el-input placeholder="请输入X位置" v-model="bench[13]['position']" @keyup.native="validateInput13">
                        </el-input>
                        <div>(-65 - 65°)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[13]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[13]['v']"></el-input>
                        <div>(0-10)</div>

                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(13)" disabled
                            v-if="light_open == false">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(13)" v-if="light_open">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(13)"
                            style="display: flex;  align-items: center;" disabled v-if="light_open == false">停止
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(13)"
                            style="display: flex;  align-items: center;" v-if="light_open">停止
                        </el-button>
                    </div>
                    <div class="attr_box">
                        <span class="span_move">散射光源 Y：</span>
                        <el-input placeholder="请输入Y位置" v-model="bench[14]['position']" @keyup.native="validateInput14">
                        </el-input>
                        <div>(0-600)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[14]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[14]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 50) this.value = '50';"></el-input>
                        <div>(0-50)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(14)" disabled
                            v-if="light_open == false">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(14)" v-if="light_open">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(14)"
                            style="display: flex;  align-items: center;" disabled v-if="light_open == false">停止
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(14)"
                            style="display: flex;  align-items: center;" v-if="light_open">停止
                        </el-button>
                    </div>
                    <div class="attr_box">
                        <span class="span_move">散射光源 R:</span>
                        <el-input placeholder="请输入R位置" v-model="bench[15]['position']" @keyup.native="validateInput7">
                        </el-input>
                        <div>(-180-180°)</div>
                        <span class="span_location">当前位置：</span>
                        <el-input v-model="this.bench[15]['s']"></el-input>
                        <span class="span_v">速度：</span>
                        <el-input v-model="bench[15]['v']"
                            onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                        <div>(0-5)</div>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(15)" disabled
                            v-if="light_open == false">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-s-tools" @click="benchmove(15)" v-if="light_open">移动
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(15)"
                            style="display: flex;  align-items: center;" disabled v-if="light_open == false">停止
                        </el-button>
                        <el-button type="text" icon="el-icon-video-pause" @click="benchstop(15)"
                            style="display: flex;  align-items: center;" v-if="light_open">停止
                        </el-button>
                    </div>
                    <!--          <div class="attr_box">-->
                    <!--            <span class="span_move">光源开启:</span>-->
                    <!--            <el-button class="light-button ">-->
                    <!--              开启太阳点光源-->
                    <!--            </el-button>-->
                    <!--            <el-button class="light-button stop">-->
                    <!--              关闭太阳点光源-->
                    <!--            </el-button>-->
                    <!--            <el-button class="light-button check">-->
                    <!--              开启模拟天空散射光源-->
                    <!--            </el-button>-->
                    <!--            <el-button class=" light-button ">-->
                    <!--              关闭模拟天空散射光源-->
                    <!--            </el-button>-->
                    <!--          </div>-->

                </div>
            </div>


        </div>
        <div class="right-box">
            <div class="box1">
                <div class="title">
                    <span>成像亮度计</span>
                    <!--          <el-button class="btn move" @click="benchmove([9, 10, 11, 12, 16])" icon="el-icon-video-play">-->
                    <!--            移动-->
                    <!--          </el-button>-->
                </div>

                <!-- <div class="attr">
                    <span class="span_move">上下平移:</span>
                    <el-input placeholder="输入移动到的位置" v-model="bench[9]['position']"
                              @keyup.native="validateInput9">
                    </el-input>
                    <div class="div">(0-220mm)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[9]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[9]['v']"
                              onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                    <div class="div2">(0-5)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(9)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(9)"
                               style="display: flex;  align-items: center;">停止
                    </el-button>
                </div> -->
                <div class="attr">
                    <span class="span_move">左右平移:</span>
                    <el-input placeholder="请输入移动到的位置" v-model="bench[10]['position']" @keyup.native="validateInput10">
                    </el-input>
                    <div class="div">(-200 - 200)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[10]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[10]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 10) this.value = '10';"></el-input>
                    <div class="div2">(0-10)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(10)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(10)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>
                <div class="attr">
                    <span class="span_move">前后平移:</span>
                    <el-input placeholder="请输入上轴移动位置" v-model="bench[11]['position']" @keyup.native="validateInput11">
                    </el-input>
                    <div class="div">(0-1200mm)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[11]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[11]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 100) this.value = '100';"></el-input>
                    <div class="div2">(0-100)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(11)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(11)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>
                <!-- <div class="attr">
                    <span class="span_move">前后平移二:</span>
                    <el-input placeholder="请输入下轴移动位置" v-model="bench[12]['position']"
                              @keyup.native="validateInput12">
                    </el-input>
                    <div class="div">(0-1150mm)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[12]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[12]['v']"
                              onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 200) this.value = '200';"></el-input>
                    <div class="div2">(0-200)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(12)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(12)"
                               style="display: flex;  align-items: center;">停止
                    </el-button>
                </div> -->
                <div class="attr">
                    <span class="span_move">左右旋转:</span>
                    <el-input placeholder="请输入圆弧角度" v-model="bench[16]['position']" @keyup.native="validateInput16">
                    </el-input>
                    <div class="div">(-50-50°)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[16]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[16]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 10) this.value = '10';"></el-input>
                    <div class="div2">(0-10)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(16)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(16)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>

            </div>
            <div class="box1">
                <div class="title">
                    <span>摄像头控制</span>
                    <!--          <el-button class="btn move" icon="el-icon-video-play" @click="benchmove([8, 0, 1, 2, 3])">-->
                    <!--            移动-->
                    <!--          </el-button>-->
                </div>
                <div class="attr">
                    <span class="span_move">上下平移:</span>
                    <el-input placeholder="输入移动到的点位" v-model="bench[8]['position']" @keyup.native="validateInput8">
                    </el-input>
                    <div class="div">(-250 - 250 )</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[8]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[8]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                    <div class="div2">(0-5)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(8)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(8)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>
                <div class="attr">
                    <span class="span_move">左右平移:</span>
                    <el-input placeholder="输入需要到达的位置" v-model="bench[3]['position']" @keyup.native="validateInput3">
                    </el-input>
                    <div class="div">(-200 - 200 )</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[3]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[3]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 50) this.value = '50';"></el-input>
                    <div class="div2">(0-50)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(3)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(3)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>

                <div class="attr">
                    <span class="span_move">左右旋转:</span>
                    <el-input placeholder="输入Y轴旋转角度" v-model="bench[1]['position']" @keyup.native="validateInput5">
                    </el-input>
                    <div class="div">(-90-90°)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[1]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[1]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                    <div class="div2">(0-5)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(1)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(1)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>
                <div class="attr">
                    <span class="span_move">上下旋转:</span>
                    <el-input placeholder="输入R轴旋转角度" v-model="bench[2]['position']" @keyup.native="validateInput5">
                    </el-input>
                    <div class="div">(-90-90°)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[2]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[2]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                    <div class="div2">(0-5)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(2)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(2)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>
                <div class="attr">
                    <span class="span_move">&nbsp;自&nbsp;&nbsp;&nbsp;&nbsp;旋&nbsp;&nbsp;:</span>
                    <el-input placeholder="输入P轴旋转角度" v-model="bench[0]['position']" @keyup.native="validateInput7">
                    </el-input>
                    <div class="div">(-180-180°)</div>
                    <span>当前位置：</span>
                    <el-input v-model="this.bench[0]['s']"></el-input>
                    <span>速度：</span>
                    <el-input v-model="bench[0]['v']"
                        onkeyup="this.value = this.value.replace(/[^\d]/g, ''); if(parseInt(this.value) < 0) this.value = '0'; if(parseInt(this.value) > 5) this.value = '5';"></el-input>
                    <div class="div2">(0-5)</div>
                    <el-button type="text" icon="el-icon-s-tools" @click="benchmove(0)">移动</el-button>
                    <el-button type="text" icon="el-icon-video-pause" @click="benchstop(0)"
                        style="display: flex;  align-items: center;">停止
                    </el-button>
                </div>


            </div>
            <div class="title">
                <span style="font-size: 25px; color: red; margin-right: auto;">导轨移动 {{ this.is_guide_move }}</span>

                <!--          <el-button class="btn move" icon="el-icon-video-play" @click="benchmove([8, 0, 1, 2, 3])">-->
                <!--            移动-->
                <!--          </el-button>-->
            </div>

        </div>

        <el-dialog title="保存导轨位置" :visible.sync="cmclocation" width="30%" :before-close="handleClose">
            <el-form>
                <el-form-item label="导轨配置名称:" :label-width="formLabelWidth">
                    <el-input v-model="cms_name"></el-input>
                </el-form-item>
                <el-form-item label="主导轨前后:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[17]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏升降:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[4]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏Y轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[5]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏R轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[6]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏P轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[7]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏光源圆弧:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[13]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏光源Y:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[14]['s']"></el-input>
                </el-form-item>
                <el-form-item label="显示屏光源R:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[15]['s']"></el-input>
                </el-form-item>
                <el-form-item label="亮度计左右:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[10]['s']"></el-input>
                </el-form-item>
                <el-form-item label="亮度计前后下:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[11]['s']"></el-input>
                </el-form-item>
                <el-form-item label="亮度计圆弧:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[16]['s']"></el-input>
                </el-form-item>
                <el-form-item label="摄像头升降:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[8]['s']"></el-input>
                </el-form-item>
                <el-form-item label="摄像头P轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[0]['s']"></el-input>
                </el-form-item>
                <el-form-item label="摄像头Y轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[1]['s']"></el-input>
                </el-form-item>
                <el-form-item label="摄像头R轴:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[2]['s']"></el-input>
                </el-form-item>
                <el-form-item label="摄像头左右:" :label-width="formLabelWidth">
                    <el-input v-model="this.bench[3]['s']"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="cmclocation = false">取 消</el-button>
                <el-button type="primary" @click="savecms">确 定</el-button>
            </div>
        </el-dialog>

        <el-dialog v-loading="loading_angle" element-loading-text="正在计算灯光角度请稍等" title="计算灯光角度"
            :visible.sync="is_autolightcalculate" width="30%" :before-close="handleClose">
            <el-form>
                <el-form-item label="选择灯光:" :label-width="formLabelWidth">
                    <el-radio :label="0" v-model="Selectlight.id" style="font-size: 13px; color: white">天空散射光
                    </el-radio>
                    <el-radio :label="1" v-model="Selectlight.id" style="font-size: 13px; color: white">太阳点光源
                    </el-radio>
                </el-form-item>
            </el-form>
            <el-form>
                <el-form-item label="亮度计导轨角度:" :label-width="formLabelWidth">
                    <el-input v-model="Selectlight.angle" @keyup.native="autoangle"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="is_autolightcalculate = false">取 消</el-button>
                <el-button type="primary" @click="CalculatingAngle">确 定</el-button>
            </div>
        </el-dialog>
        <el-dialog v-loading="loading_DeviceReset" element-loading-text="正在复位请稍等" title="是否急停复位"
            :visible.sync="is_DeviceReset" width="30%" :before-close="handleClose">
            <span style="font-size: 25px; color: red; margin-right: auto;">是否急停复位</span>
            <div slot="footer" class="dialog-footer">
                <el-button @click="is_DeviceReset = false">取 消</el-button>
                <el-button type="primary" @click="DeviceReset">确 定</el-button>
            </div>
        </el-dialog>




    </div>
</template>

<script>
import { ajax } from "@/utils/ajax";

// 导入 agv 所有接口
import { time } from "echarts";

export default {
    created() {
        // 先获取小车列表
        this.setupWebSocket();
        this.getallinform()
        this.GetCard()

    },
    beforeDestroy() {
        this.closeWebSocket(); // 在组件销毁前关闭WebSocket连接
    },

    watch: {},

    computed: {},
    data() {
        return {
            websocket: null, // WebSocket对象
            is_guide_move: '导轨处于停止状态',
            is_DeviceReset: false,
            loading_DeviceReset: false,
            loading_angle: false,
            is_autolightcalculate: false,
            url: 'http://10.10.10.83:8000/media',
            cms_name: '',
            cmclocation: false,
            startstatus: -1,
            Selectlight: {
                'id': '',
                'angle': '',
            },
            start_light: {
                'lux': '',
                'cct': '',
                'eight': '',
                'nine': '',
            },
            currentIndex: 0,
            chart: 0,
            baseUrl: this.$settings.BASE_URL + "media/img/",
            card: [],
            is_cardupdate: false,
            card_all: '',
            cardupdate: {
                'card_name': '',
                'sort': '',
                'image_url': '',
                'decription_id': ''
            },
            formLabelWidth: "120",
            imgUrl: "file://PP/test_photo/Camera/IMG_20211009_191419.jpg",
            bench: [
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
                {'s': 0, 'v': 0,'position': 0},
            ],
            is_light: false,
            passowrd: '',
            light_open: true,
        }
    },
    methods: {
        setupWebSocket() {
            this.websocket = new WebSocket("ws://10.10.20.127:8000/socket/all/"); // 创建WebSocket连接
            this.websocket.onopen = this.onWebSocketOpen; // WebSocket连接打开时的处理函数
            this.websocket.onmessage = this.onWebSocketMessage; // 收到WebSocket消息时的处理函数
            this.websocket.onclose = this.onWebSocketClose; // WebSocket连接关闭时的处理函数
        },
        onWebSocketOpen() {
            console.log("链接成功");
        },
        onWebSocketMessage(event) {
            var message = event.data;
            var dictionary = JSON.parse(message)
            console.log('message',dictionary.message.index,dictionary.message.location)
            this.bench[dictionary.message.index]['s'] = dictionary.message.location
            console.log(this.bench[dictionary.message.index]['s'])
            // this.bench[dictionary.message.index]['position'] = dictionary.message.location

            // 在这里您可以根据消息的内容执行不同的操作，例如更新界面、触发事件等
        },

        closeWebSocket() {
            if (this.websocket) {
                this.websocket.close(); // 关闭WebSocket连接
            }
        },


        // 角度
        autoangle(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');

            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -50) {
                event.target.value = '-50';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 50) {
                event.target.value = '50';
            }
        },
        validateInput0(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');

            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '610';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 10375) {
                event.target.value = '10375';
            }
        },
        validateInput3(event) {
            const value = event.target.value;
            // // 只保留数字和小数点
            // event.target.value = value.replace(/[^\d.]/g, '');

            // // 限制小数点后最多两位
            // if (event.target.value.includes('.')) {
            //     const parts = event.target.value.split('.');
            //     parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
            //     event.target.value = parts.join('.');
            // }

            // 处理负数情况
            if (parseFloat(event.target.value) < -200) {
                event.target.value = '-200';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 200) {
                event.target.value = '200';
            }
        },
        validateInput55(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -180) {
                event.target.value = '-180';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 180) {
                event.target.value = '180';
            }
        },
        validateInput5(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -90) {
                event.target.value = '-90';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 90) {
                event.target.value = '90';
            }
        },
        validateInput4(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -150) {
                event.target.value = '-150';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 150) {
                event.target.value = '150';
            }
        },
        validateInput7(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -180) {
                event.target.value = '-180';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 180) {
                event.target.value = '180';
            }
        },
        validateInput13(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -65) {
                event.target.value = '-65';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 65) {
                event.target.value = '65';
            }
        },
        validateInput14(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '0';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 600) {
                event.target.value = '600';
            }
        },
        validateInput9(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '0';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 220) {
                event.target.value = '220';
            }
        },
        validateInput10(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -200) {
                event.target.value = '-200';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 200) {
                event.target.value = '200';
            }
        },
        validateInput11(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '0';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 1200) {
                event.target.value = '1200';
            }
        },
        validateInput12(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '0';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 1150) {
                event.target.value = '1150';
            }
        },
        validateInput8(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -250) {
                event.target.value = '250';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 250) {
                event.target.value = '250';
            }
        },
        validateInput16(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d-.]/g, '');
            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < -50) {
                event.target.value = '-50';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 50) {
                event.target.value = '50';
            }
        },
        validateInput17(event) {
            const value = event.target.value;
            // 只保留数字和小数点
            event.target.value = value.replace(/[^\d.]/g, '');

            // 限制小数点后最多两位
            if (event.target.value.includes('.')) {
                const parts = event.target.value.split('.');
                parts[1] = parts[1] ? parts[1].slice(0, 2) : null;
                event.target.value = parts.join('.');
            }

            // 处理负数情况
            if (parseFloat(event.target.value) < 0) {
                event.target.value = '0';
            }

            // 设置最大值
            if (parseFloat(event.target.value) > 8500) {
                event.target.value = '8500';
            }
        },
        // open_light() {
        //     this.is_light = true
        // },
        // open_light_is() {
        //     this.$axios.get(this.$settings.BASE_URL + `cmsauto/is_light/?id=${this.passowrd}`).then((res) => {
        //         if (res.data.code == 100) {
        //             this.is_light = false
        //             this.light_open = true
        //             this.$message('开启成功');
        //         } else {
        //             this.is_light = true
        //             this.$message('密码错误');
        //         }
        //     })
        // },

        CalculatingAngle() {
            this.loading_angle = true
            this.$axios.post(this.$settings.BASE_URL + 'CMS-Control/cms-autoangle/',
                {
                    'Angle': this.Selectlight.angle,
                    'id': this.Selectlight.id
                }
            ).then((res) => {
                if (res.data.code == 100) {
                    this.loading_angle = false
                    this.is_autolightcalculate = false
                    this.$message('计算完成');
                } else {
                    this.loading_angle = false
                    this.$message('计算失败');
                }
            })
        },
        DeviceReset() {
            this.loading_DeviceReset = true
            this.$axios.get(this.$settings.BASE_URL + 'CMS-Control/main-guide/DeviceReset/'
            ).then((res) => {
                if (res.data.code == 100) {
                    this.loading_DeviceReset = false
                    this.is_DeviceReset = false
                    this.$message(res.data.msg);
                } else {
                    this.loading_DeviceReset = false
                    this.$message(res.data.msg);
                }
            })
        },
        savecms() {
            if (this.bench[17]['s'] > 8500) {
                this.bench[17]['s'] = 8500
            }
            if (this.bench[17]['s'] < 0) {
                this.bench[17]['s'] = 0
            }
            if (this.bench[13]['s'] < -65) {
                this.bench[13]['s'] = -65
            }
            if (this.bench[13]['s'] > 65) {
                this.bench[13]['s'] = 65
            }

            if (this.bench[14]['s'] < 0) {
                this.bench[14]['s'] = 0
            }
            if (this.bench[14]['s'] > 600) {
                this.bench[14]['s'] = 600
            }

            this.$axios.post(this.$settings.BASE_URL + 'CMS-Control/cms-guides/', {
                'cms_auto_name': this.cms_name,
                'cms_auto_0': this.bench[0]['s'],
                'cms_auto_1': this.bench[1]['s'],
                'cms_auto_2': this.bench[2]['s'],
                'cms_auto_3': this.bench[3]['s'],
                'cms_auto_4': this.bench[4]['s'],
                'cms_auto_5': this.bench[5]['s'],
                'cms_auto_6': this.bench[6]['s'],
                'cms_auto_7': this.bench[7]['s'],
                'cms_auto_8': this.bench[8]['s'],
                'cms_auto_9': this.bench[9]['s'],
                'cms_auto_10': this.bench[10]['s'],
                'cms_auto_11': this.bench[11]['s'],
                'cms_auto_12': this.bench[12]['s'],
                'cms_auto_13': this.bench[13]['s'],
                'cms_auto_14': this.bench[14]['s'],
                'cms_auto_15': this.bench[15]['s'],
                'cms_auto_16': this.bench[16]['s'],
                'cms_auto_17': this.bench[17]['s'],
            }).then((res) => {
                if (res.data.code == 100) {
                    this.getallinform()
                    this.cmclocation = false
                    this.cms_name = ''
                    this.$message({
                        message: res.data.msg,
                        type: 'success'
                    });

                } else {
                    this.$message.error(res.data.msg);
                    this.getallinform()
                }
            }
            ).catch(error => {
                this.$message.error(error);
                this.getallinform()
            }
            );
        },
        cmslocation() {
            this.getallinform()
            this.cmclocation = true
        },
        handleClose(done) {
            this.$confirm('确认关闭？')
                .then(_ => {
                    done();
                })
                .catch(_ => {
                });
        },
        sleep(ms) { //sleep延迟方法2
            var unixtime_ms = new Date().getTime();
            while (new Date().getTime() < unixtime_ms + ms) {
            }
        },
        getallinform() {
            const cmsControlMainGuideGetCmsMainPosition = 'CMS-Control/main-guide/GetCmsMainPosition/';
            console.log(this.$settings.BASE_URL + cmsControlMainGuideGetCmsMainPosition)
            this.$axios.get(this.$settings.BASE_URL + cmsControlMainGuideGetCmsMainPosition).then((res) => {
                if (res.data.code == 100) {
                    this.bench = res.data.data;
                }
                // alert(this.bench[0]['p'])
                else {
                    this.$notify.error({ title: res.data.msg });
                }
                // alert(this.bench[0]['p'])
            })
        },


        changebenchv(id) {
            // this.start_plc()
            this.sleep(10000)
            // if (this.startstatus == 0) {
            // alert('进入修改速度')
            this.$axios.get(this.$settings.BASE_URL + `cmsauto/alls/?id=${id}&v=${this.bench[id]['v']}&s=${this.bench[id]['s']}`).then((res) => {
                if (res.data.code == 100) {
                    this.$message({
                        message: res.data.msg,
                        type: 'success'
                    });
                } else {
                    this.$message.error(res.data.msg);
                }
            })
            // this.sleep(3000)
            // }
            this.stop_plc()

        },

        // benchzero(id) {
        //
        //     // this.sleep(3000)
        //     // if (this.startstatus == 0) {
        //     // console.log(id_all)
        //     // this.start_plc()
        //     // await new Promise((resolve, inject) => {
        //     // console.log(id_all[i]); //打印结果为books的索引
        //     // alert(id_all[i])
        //     this.$axios.get(this.$settings.BASE_URL + `cmsauto/benchzero/?id=${id_all[i]}`).then((res) => {
        //         if (res.data.code == 100) {
        //             this.$message({
        //                 message: res.data.msg,
        //                 type: 'success'
        //             });
        //             this.bench[id_all[i]]['s'] = res.data.data[17]['s']
        //             this.bench[id_all[i]]['position'] = res.data.data[17]['s']
        //             resolve();
        //         } else {
        //             this.$message.error(res.data.msg);
        //         }
        //     })
        //         // this.sleep(3000)
        //
        //     // })
        //     // this.stop_plc()
        // },
        bigcard() {
            this.$axios.get(this.$settings.BASE_URL + `cmsauto/alls/?id=${17}&s=9725&v=50`).then((res) => {
                if (res.data.code == 100) {
                    this.$message({
                        message: res.data.msg,
                        type: 'success'
                    });
                    this.bench = res.data.data
                    // resolve();
                } else {
                    this.$message.error(res.data.msg);
                    this.bench = res.data.data
                }
            })
        },
        twopoint() {
            this.$axios.get(this.$settings.BASE_URL + `cmsauto/alls/?id=${17}&s=6075&v=50`).then((res) => {
                if (res.data.code == 100) {
                    this.$message({
                        message: res.data.msg,
                        type: 'success'
                    });
                    this.bench = res.data.data
                    // resolve();
                } else {
                    this.$message.error(res.data.msg);
                    this.bench = res.data.data
                }
            })
        },
        async benchmove(id) {
            if (id == 17) {
                if (this.bench[17]['position'] > 8500) {
                    this.bench[17]['position'] = 8500
                }
                if (this.bench[17]['position'] < 0) {
                    this.bench[17]['position'] = 0
                }

            }
            // console.log(id_all[i]); //打印结果为books的索引
            // alert(id_all[i])
            console.log(this.bench[id]['v'])
            this.is_guide_move = '导轨处于移动状态'
            this.$axios.post(this.$settings.BASE_URL + `CMS-Control/main-guide/SetCmsMainSpeed/`, {
                'position': id,
                'speed': this.bench[id]['v']
            }).then((res) => {

                if (res.data.code == 100) {
                    this.$axios.post(this.$settings.BASE_URL + `CMS-Control/main-guide/SetCmsMainMoving/`, {
                        'position': id,
                        'distance': parseFloat(this.bench[id]['position'])
                    }).then((res) => {
                        if (res.data.code == 100) {
                            this.$message({
                                message: res.data.msg,
                                type: 'success'
                            });
                            this.is_guide_move = '导轨处于停止状态'
                            this.bench = res.data.data
                            // resolve();
                        } else {
                            this.is_guide_move = '导轨处于停止状态'
                            this.$message.error(res.data.msg);
                            this.bench = res.data.data
                        }
                    })
                } else {
                    this.is_guide_move = '导轨处于停止状态'
                    this.$message.error(res.data.msg);
                    this.bench = res.data.data
                }
            })

            // this.sleep(3000)
            // })
            // this.stop_plc()
        },
        benchstop(id) {
            // this.start_plc()
            // this.sleep(3000)
            // if (this.startstatus == 0) {
            // console.log(id_all)
            // await new Promise((resolve, inject) => {
            this.$axios.post(this.$settings.BASE_URL + `CMS-Control/main-guide/SetCmsMainStop/`, {
                'position': id
            }).then((res) => {
                if (res.data.code == 100) {
                    this.$message({
                        message: res.data.msg,
                        type: 'success'
                    });
                } else {
                    this.$message.error(res.data.msg);
                }
            });
            // });
            // this.sleep(3000)


            //  this.stop_plc()
        }
    }
    // },
};


</script>

<style lang="less">
.el-input {
    color: #ccc;
    width: 16.770833vw;
    height: 3.77777778vh;
    border-radius: 0px;
}


.el-message-box {
    background-color: #262626;
    color: #ccc;
    border: 0px solid #262626
}

.el-message-box__content {
    color: #ccc;
}

/*.el-dialog__wrapper {*/
/*  background-color: #262626 !important;*/
/*}*/
.el-form-item__label {
    color: #ccc;
}

.el-dialog {
    background-color: #262626 !important;
    color: #ccc;
    /*color: #ccc;*/
}

.el-dialog__title {
    color: #cccccc;
}

.el-input__inner {
    color: white
}

.page-agv {
    overflow: hidden; //高度超出显示滚动条

    // 检测屏幕宽度
    @media screen and (min-width: 1000px) and (max-width: 1500px) {

        // 屏幕宽度在1000 到 1500之间
        .el-button {
            height: @h*40vh;
            line-height: 1;
            // padding: @h*5vh @w*8vw;
            font-size: 1rem;
        }
    }

    .left-box {
        float: left;
        width: @w*900vw;
        padding: 0 @w*30vw;
        background: #2e2e2e;
        height: @h*1000vh;

        .box1 {
            width: @w*900vw;
            min-height: @h*130vh;
            float: left;

            .title {
                height: @h*70vh;
                line-height: @h*70vh;
                font-size: @h*18vh;

                .my_class {
                    float: right;
                    height: @h*20vh;
                    line-height: 0;
                    padding: 0 !important;
                    margin: @h*15vh 0 0 @w*10vw;
                    border-radius: 0px;
                    width: @w*100vw;
                    color: #fff;
                    border: none;
                }

                .el-button {
                    float: right;
                    height: @h*30vh;
                    line-height: 0;
                    padding: 0 !important;
                    //margin: 2.851852vh 0 0 @w*10vw;
                    border-radius: 0px;
                    width: @w*100vw;
                    color: #fff;
                    border: none;

                }

                .move {
                    background: #0FAB5D;

                }

                .default {

                    background: #262626;
                }

            }

            .attr {
                min-height: @h*70vh;
                width: 47.875vw;
                line-height: @h*70vh;
                background: #404040;
                margin-bottom: 10px;

                .attr_box {
                    min-height: @h*70vh;
                    width: 47.875vw;
                    line-height: 8.481481vh;
                    background: #404040;

                    .check {
                        background: #00A8FC;
                    }

                    .stop {
                        background: #EA2F2F;
                    }

                    .light-button {
                        width: @w*160vw;
                        height: @h*30vh;
                        // background: #262626;

                        border-radius: 0px;
                        padding: 0;
                        border: none;
                        text-align: center;

                        span {
                            width: @w*160vw;
                            margin: 0;
                            color: #fff;
                            text-align: center;

                        }
                    }

                }

                span {
                    float: left;
                    font-size: @h*16vh;
                    margin-left: @w*20vw;
                    color: #ccc;

                }

                .span_move {
                    width: 4.9vw;
                }

                .span_light {
                    width: @w*65vw;
                }

                .span_location {
                    width: @w*90vw;
                }

                .span_v {
                    width: @w*50vw;
                }

                .el-input__inner {
                    background-color: #262626;
                    font-size: @h*18vh;
                    border: none;
                    height: @h*30vh;
                }

                .el-input {
                    float: left;

                    color: #ccc;
                    // margin: @h*10vh 0;
                    // background: #262626;
                    width: 4.770833vw;
                    height: @h*70vh;
                    // background: #262626;

                    border-radius: 0px;
                }

                div {
                    float: left;
                    font-size: 1.11111111vh;
                    width: 4.60625vw;
                    color: #ccc;
                    // font-size: ;
                }

                .el-button1st {
                    margin: 0 0 0 @w*5vw !important;
                }

                .el-button {
                    margin: @w*30vw 0 0 @w*5vw;
                    float: left;
                    background: #262626;
                    width: @w*80vw;
                    height: @h*30vh;
                    // line-height: @h*30vh;

                    span {
                        margin-left: @w*30vw;
                        // line-height: @h*30vh;
                        line-height: 0;
                        float: left;
                        color: #66b1ff;

                    }

                    .el-icon-s-tools {
                        float: left;
                        margin-left: @w*5vw;
                        line-height: 0;
                        width: 0;
                    }

                    .el-icon-video-pause {
                        float: left;
                        margin-left: @w*5vw;
                        line-height: 0;
                        width: 0;
                    }
                }


            }
        }
    }

    .right-box {
        float: left;
        width: @w*900vw;
        padding: 0 @w*30vw;
        background: #404040;
        height: @h*1000vh;

        .box1 {
            width: @w*900vw;
            min-height: @h*130vh;
            float: left;

            .title {
                height: @h*70vh;
                line-height: @h*70vh;
                font-size: @h*18vh;

                .el-button {
                    float: right;
                    height: @h*30vh;
                    line-height: 0;
                    padding: 0 !important;
                    //margin: @h*20vh 0 0 @w*10vw;
                    border-radius: 0px;
                    width: @w*100vw;
                    color: #fff;
                    border: none;
                }

                .move {
                    background: #0FAB5D;

                }

                .default {

                    background: #262626;
                }

            }

            .attr {
                min-height: 7.481481vh;
                width: 50.875vw;
                line-height: @h*70vh;
                background: #262626;

                .div {
                    width: 4.40625vw
                }

                .div2 {
                    width: 3.1vm
                }

                .attr_box {
                    min-height: @h*70vh;
                    width: @w*900vw;
                    line-height: 7.481481vh;
                    background: #262626;

                    .check {
                        background: #00A8FC;
                    }

                    .stop {
                        background: #EA2F2F;
                    }

                    .light-button {
                        width: @w*160vw;
                        height: @h*30vh;
                        // background: #262626;

                        border-radius: 0px;
                        padding: 0;
                        border: none;
                        text-align: center;

                        span {
                            width: @w*160vw;
                            margin: 0;
                            color: #fff;
                            text-align: center;

                        }
                    }

                }

                span {
                    float: left;
                    font-size: @h*16vh;
                    margin-left: @w*20vw;
                    color: #ccc;

                }

                .span_move {
                    width: 5.6vw;
                }

                .span_light {
                    width: @w*65vw;
                }

                .span_location {
                    width: @w*90vw;
                }

                .span_v {
                    width: @w*50vw;
                }

                .el-input__inner {
                    background-color: #404040;
                    font-size: @h*18vh;
                    border: none;
                    height: @h*30vh;
                }

                .el-input {
                    float: left;

                    color: #ccc;
                    // margin: @h*10vh 0;
                    // background: #262626;
                    width: 4.770833vw;
                    height: @h*70vh;
                    // background: #262626;

                    border-radius: 0px;
                }

                div {
                    float: left;
                    font-size: @h*12vh;
                    width: @w*75vw;
                    color: #ccc;
                    // font-size: ;
                }

                .el-button {
                    margin: 2vh 0 0 @w*20vw;
                    float: left;
                    background: #404040;
                    height: @h*30vh;
                    width: @w*80vw;
                    // line-height: @h*30vh;

                    span {
                        margin-left: @w*30vw;
                        // line-height: @h*30vh;
                        line-height: 0;
                        float: left;
                        color: #66b1ff;

                    }

                    .el-icon-s-tools {
                        float: left;
                        margin-left: @w*10vw;
                        line-height: 0;
                        width: 0;
                    }

                    .el-icon-video-pause {
                        float: left;
                        margin-left: @w*10vw;
                        line-height: 0;
                        width: 0;
                    }
                }


            }
        }


    }

    .box-two {
        float: left;
        margin: @h*20vh 0;
        height: @h*116vh;
        width: @w*960vw;

        .box-title {
            float: left;
            height: @h*116vh;
            width: @w*100vw;

            .el-button {
                float: left;
                margin: 0;
                padding: @h*10vh @w*15vw;
                color: white;
            }
        }

        .title {
            float: left;
            width: @w*18vw;
            writing-mode: sideways-lr;
            height: @h*80vh;
            font-size: @h*18vh;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: #FFFFFF;
            line-height: @h*29vh;
        }

        .chartchoose {
            float: left;
            width: @w*749vw;
            height: @h*116vh;
            margin: 0 @h*20vh;
            ;
            background: #262626;
            border-radius: 1px;
        }
    }

    .el-carousel__item h3 {
        color: #475669;
        font-size: @h*14vh;
        opacity: 0.75;
        line-height: @h*200vh;
        margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
    }

    .el-carousel__container {
        position: relative;
        height: @h*116vh;
    }
}

.move-down {
    margin-top: 20px;
    background: #0FAB5D
}

.el-input__inner {
    background-color: #262626
}
</style>
